/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

/*import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View,
AppRegistry,
  ViewPagerAndroid,
  TouchableOpacity,
  Image
} from 'react-native';

const instructions = Platform.select({
  ios: 'Press Cmd+R to reload,\n' +
    'Cmd+D or shake for dev menu',
  android: 'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
});


type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to React Native!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit App.js
        </Text>
        <Text style={styles.instructions}>
          {instructions}
        </Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});*/

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  ViewPagerAndroid,
  TouchableOpacity,
    StatusBar,
    Button,
  Image,
  View
} from 'react-native';

import ViewPagerInAndroid from './ViewPagerInAndroid';
import DealViewList from "./view/DealViewList";
import HomeScreen from "./HomeScreen";
import {StackNavigator} from "react-navigation";
import DetectData from "./view/DetectData";
import WholeView from "./view/WholeView";
import MieHuoQiView from "./view/MieHuoQiView";
import AssetPage from './AssetPage'
import CheckPointPage from './CheckPointPage'
import xiaofangDetail from "./xiaofangDetail";

export default class App extends Component {

     static navigationOptions = {header :null,};

    render(){
        return (
            <SimpleApp></SimpleApp>
            //<WholeView/>
            //<MieHuoQiView/>
        );
    }
}

//AppRegistry.registerComponent('SimpleApp', () => SimpleApp);

const SimpleApp = StackNavigator({
    Home:{screen:HomeScreen,
        },
    ViewPagerInAndroid:{screen:ViewPagerInAndroid},
    AssetPage:{screen:AssetPage},
    CheckPointPage:{screen:CheckPointPage},
    WholeView:{screen:WholeView},
    Item:{screen:xiaofangDetail},
    MieHuoQiView:{screen:MieHuoQiView},
}, {
        navigationOptions: {
            header:null,
            swipeEnabled: true,
            animationEnabled: true,
        },
        mode: 'card',
    },
    );
//navigationOptions {}

/*var PAGES = 2;
var IMAGE_URIS = [
  'http://apod.nasa.gov/apod/image/1410/20141008tleBaldridge001h990.jpg',
  'http://apod.nasa.gov/apod/image/1409/volcanicpillar_vetter_960.jpg'
];
var titles = ['今日巡查','超时未检','已完成'];
export default class ViewPagerDemo extends Component {
  state={
	page:0,
  };
  render() {
  var pages = [];
  for(let i = 0;i < PAGES;i++){
	pages.push(
	  <View key={i} collapsable={false}>
	   <TouchableOpacity
	   activeOpacity={1}
	   onPress={this.onPress}
	   >
		<Image
		  style={styles.image}
		  source={{uri:IMAGE_URIS[i]}}>
		</Image>
		</TouchableOpacity>
	  </View>
	);
  }
	return (
	  <View style={styles.container}>
		<ViewPagerAndroid style={styles.viewPager}
		initialPage={0}
		onPageSelected={this.onPageSelected}
		>
		{/!*{pages}*!/}
            <View style={styles.pageStyle}>
                <Text>First page</Text>
            </View>
            <View style={styles.pageStyle}>
                <Text>Second page</Text>
            </View>
		</ViewPagerAndroid>
		<Text style={{flex:1,alignSelf:'center'}}>当前第{this.state.page+1}页</Text>
	  </View>
	);
  }
  onPageSelected=(e)=>{
	this.setState({page:e.nativeEvent.position});
  }
  onPress=()=>{
	alert('第'+(this.state.page+1)+'页被点击了');
  }
}

AppRegistry.registerComponent('ViewPagerDemo', () => ViewPagerDemo);*/
